<extend name="_layout/main" />
<block name="head">

</block>
<block name="content">
    <div class="page-content">
        <div class="page-breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="{:U('dashboard/index')}">系统首页</a>
                </li>
                <li>
                    <a href="javascript:;">行业管理</a>
                </li>
                <li class="active">行业分类</li>
            </ul>
        </div>
        <div class="page-body">
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    <div class="widget">
                        <form action="{:U('industry/sort')}" method="post">
                            <div>
                                <div class="text-align-right margin-bottom-10">
                                    <a href="{:U('industry/cache')}" class="btn btn-blue" ><i class="fa fa-plus"></i>更新缓存</a>  <a href="{:U('industry/add')}" class="btn btn-danger ajax-load" ><i class="fa fa-plus"></i>添加行业</a>
                                </div>
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th class="text-align-center" width="80">排序</th>
                                        <th class="text-align-center" width="150">ICON</th>
                                        <th class="text-align-center" width="80">ID</th>
                                        <th class="text-align-center">行业名称</th>
                                        <th width="200" class="text-align-center">
                                            操作
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <notempty name="result">
                                        <volist name="result" id="item">
                                        <tr>
                                            <td class="text-center input-group-xs"><input type="text" class="form-control text-center" maxlength="3" name="sort[{$item.id}]" value="{$item.sort}" /> </td>
                                            <td class="text-align-center"><img src="{$item.icon}" style="max-height:80px;" /></td>
                                            <td class="text-align-center">{$item.id}</td>
                                            <td class="text-align-center">{$item.name}</td>
                                            <td class="text-align-center">
                                                <a href="{:U('industry/edit',['id'=>$item['id']])}" class="btn btn-default btn-xs ajax-load"><i class="fa  fa-edit"></i>编辑</a>
                                                <a href="{:U('industry/delete',['id'=>$item['id']])}" class="btn btn-danger btn-xs white" data-confirm="确定删除该行业分类?"><i class="fa fa-trash-o"></i>删除</a>
                                            </td>
                                        </tr>
                                        </volist>
                                    <else />
                                        <tr>
                                            <td colspan="4">
                                                没有记录
                                            </td>
                                        </tr>
                                    </notempty>
                                    </tbody>
                                </table>
                                <div class="row DTTTFooter">
                                    <div class="col-sm-6">
                                        <div class="dataTables_info" id="simpledatatable_info" role="status" aria-live="polite">
                                            <div class="buttons-preview">
                                                <button type="submit" class="btn btn-default">排序</button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
                                            {$page}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="footer">
    <script src="/Public/assets/js/validation/bootstrapValidator.js" type="text/javascript" charset="utf-8"></script>
</block>